package com.lucene.test.init;

import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.wltea.analyzer.cfg.DefaultConfig;
import org.wltea.analyzer.dic.Dictionary;

/**
 * @author zoumy9
 * @date 2024/05/24 00:48
 **/
public class BusinessInitializer implements ApplicationRunner {
    @Override
    public void run(ApplicationArguments args) throws Exception {
        //加载ik分词器配置 防止第一次查询慢
        Dictionary.initial(DefaultConfig.getInstance());
    }
}
